<?php
use think\facade\Db;
 
class completeRecord{
    public function TODO($frame,$fd){
        $param = (array)json_decode($frame->data); 
        $filter = [
            "toMember"  => $param['toMember'],
            "status"    => 0, 
        ]; 
        $isEmpty =  Db::name('friend_apply')
                    ->where('toMember',$param['toMember'])
                    ->where('status',0) 
                    ->order('create_time desc')
                    ->select();      
        if($isEmpty){
             $return = [
                'status'=>1,
                'msg'=>'申请列表已加载',
                'data'=>$isEmpty, 
                'act' => 'completeRecord'
                ];
        }else{
            $return = [
                'status'=>0,
                'msg'=>'暂未有可处理消息',
                'data'=>'', 
                'act' =>'completeRecord'
                ];
        }
        return $return;
    } 
}